package com.expert.miniapp.dao;

import lombok.Data;
import jakarta.persistence.*;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * 其他资源实体类
 * 对应数据库表：other_resource
 */
@Data
@Entity
@Table(name = "other_resource")
public class OtherResource {
    
    /**
     * 资源唯一标识（主键）
     */
    @Id
    @Column(name = "resource_id", length = 20, nullable = false)
    @JsonProperty("resourceId")
    private String resourceId;
    
    /**
     * 图片URL
     */
    @Column(name = "image_url", length = 500)
    @JsonProperty("imageUrl")
    private String imageUrl;
    
    /**
     * 资源名称
     */
    @Column(name = "name", length = 100)
    @JsonProperty("name")
    private String name;
    
    /**
     * 资源介绍
     */
    @Column(name = "introduction", columnDefinition = "TEXT")
    @JsonProperty("introduction")
    private String introduction;
    
    /**
     * 所属机构
     */
    @Column(name = "organization", length = 60)
    @JsonProperty("organization")
    private String organization;
    
    /**
     * 所在城市
     */
    @Column(name = "city", length = 30)
    @JsonProperty("city")
    private String city;
    
    /**
     * 摘要
     */
    @Column(name = "summary", length = 200)
    @JsonProperty("summary")
    private String summary;
    
    /**
     * 显示权重
     */
    @Column(name = "display_weight")
    @JsonProperty("displayWeight")
    private Integer displayWeight;
}